import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/views/layout/index.vue'
import DashBoard from '@/views/dashboard/index.vue'
import detail from '@/views/detail/index.vue'
import property from '@/views/property/index.vue'
import agents from '@/views/agents/index.vue'
import aboutus from '@/views/AboutUs/index.vue'
import Hotel from '@/views/hotel/index.vue'

Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    {
      path: '/',
      component: Layout,
      name: 'LayoutIndex',
      redirect: '/dashboard',
      children: [
        { path: 'property/:id', component: property },
        { path: 'dashboard', name: 'DashBoard', component: DashBoard },
        { path: 'detail/:id', component: detail },
        { path: 'agents', component: agents },
        { path: 'aboutus', component: aboutus },
        { path: 'hotel', component: Hotel }
      ]
    }

  ]
})

export default router
